//
//  NSArray+MC_Safe.h
//  RetainCount
//
//  Created by liuxiang on 2017/12/4.
//  Copyright © 2017年 liuxiang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface NSArray (MC_Safe)

-(id) mc_objectWithIndex:(NSUInteger)index;

- (NSString*) mc_stringWithIndex:(NSUInteger)index;

- (NSNumber*) mc_numberWithIndex:(NSUInteger)index;

- (NSDecimalNumber *) mc_decimalNumberWithIndex:(NSUInteger)index;

- (NSArray*) mc_arrayWithIndex:(NSUInteger)index;

- (NSArray*) mc_arrayWithRange:(NSRange)range;

- (NSDictionary*) mc_dictionaryWithIndex:(NSUInteger)index;

- (NSInteger) mc_integerWithIndex:(NSUInteger)index;

- (NSUInteger) mc_unsignedIntegerWithIndex:(NSUInteger)index;

- (BOOL) mc_boolWithIndex:(NSUInteger)index;

- (int16_t) mc_int16WithIndex:(NSUInteger)index;

- (int32_t) mc_int32WithIndex:(NSUInteger)index;

- (int64_t) mc_int64WithIndex:(NSUInteger)index;

- (char) mc_charWithIndex:(NSUInteger)index;

- (short) mc_shortWithIndex:(NSUInteger)index;

- (float) mc_floatWithIndex:(NSUInteger)index;

- (double) mc_doubleWithIndex:(NSUInteger)index;

- (NSDate *) mc_dateWithIndex:(NSUInteger)index dateFormat:(NSString *)dateFormat;
//CG
- (CGFloat) mc_CGFloatWithIndex:(NSUInteger)index;

- (CGPoint) mc_pointWithIndex:(NSUInteger)index;

- (CGSize) mc_sizeWithIndex:(NSUInteger)index;

- (CGRect) mc_rectWithIndex:(NSUInteger)index;

@end

@interface NSMutableArray (MC_Safe)

- (void) mc_addObj:(id)i;

- (void) mc_addString:(NSString*)i;

- (void) mc_addBool:(BOOL)i;

- (void) mc_addInt:(int)i;

- (void) mc_addInteger:(NSInteger)i;

- (void) mc_addUnsignedInteger:(NSUInteger)i;

- (void) mc_addCGFloat:(CGFloat)f;

- (void) mc_addChar:(char)c;

- (void) mc_addFloat:(float)i;

- (void) mc_addPoint:(CGPoint)o;

- (void) mc_addSize:(CGSize)o;

- (void) mc_addRect:(CGRect)o;


@end

